import request from '@/utils/request'
import { CHECC_API_CMS } from '@/constants/proxy'

const getInfoList = (params) => {
  return request.post(CHECC_API_CMS + '/news/get',params)
}
const addInfo = (params) => {
  return request.post(CHECC_API_CMS + '/news/add',params)
}
const updateInfo = (params) => {
  return request.put(CHECC_API_CMS + '/news/update',params)
}
const delBatchInfo = (params) => {
  return request.post(CHECC_API_CMS + '/news/deleteBatch',params)
}

const getInfoDict = () => {
  return request.post(CHECC_API_CMS + `/dictItem/codelist`, [
    'XTGL_NEWS_TYPE', //资讯类型
  ])
}
export { getInfoList,addInfo,updateInfo,delBatchInfo, getInfoDict }